<include file="../header" />
<body class="J_scroll_fixed">
    <script>

        $(document).ready(function() {

            $('button.viewJoin').click(function () {

                var id = $(this).attr("id");
                layer.open({

                    type: 2,
                    title: '报名记录查看',
                    maxmin: false,
                    shadeClose: true, //点击遮罩关闭层
                    area: ['70%', '98%'],
                    content: "{:U('activity/viewJoin')}&id="+id

                });
            });

        });

    </script>
    
<form class="well form-search" method="post" style="float:left;width:100%;" action="{:U('activity/index')}">
    <div class="search_type cc mb10">
        <div class="mb10">
        <span class="mr20">
            活动状态：{:getEnumSelectWidget($activityStatus, 'a#status', $status, 1)}
            活动类型：{:getEnumSelectWidget($activityType, 'a#activity_type', $activity_type, 1)}
            <button class="btn btn-primary">搜索</button>
            <a class="btn" href="{:U('activity/index')}">重置</a>
        </span>
        </div>
    </div>
</form>
<div class="wrap J_check_wrap">
    <ul class="nav nav-tabs">
            <li class="active"><a href="{:U('activity/index')}">活动信息</a></li>
            <li><a href="{:U('activity/add')}">添加活动</a></li>
        </ul>
    <table class="table table-hover table-bordered">
        <thead>
        <tr>
            <th>活动标题</th>
            <th>所属病症</th>
            <th>活动类型</th>
            <th>活动时间</th>
            <th>活动地址</th>
            <th>状态</th>
            <th>费用</th>
            <th>报名人数</th>
            <th>报名详情</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <foreach name="list" item="vo">
            <tr>
                <td>{$vo.title}</td>
                <td>{$vo.category_name}</td>
                <td>{:getEnumString($activityType, $vo['activity_type'])}</td>
                <td>{$vo.begin_time}</td>
                <td>{$vo.location}</td>
                <td>{:getEnumString($activityStatus, $vo['status'])}</td>
                <td>{$vo.price}元</td>
                <td>{$vo.join_number}/{$vo.upper_limit}</td>
                <td>
                    <button class="viewJoin btn" id="{$vo['activity_id']}">查看</button>
                </td>
                <td>
                    <a href='{:U("activity/edit",array("id"=>$vo["activity_id"]))}'>修改</a>
                </td>
            </tr>
        </foreach>
        </tbody>
    </table>
    <div class="pagination">{$page}</div>
</div>
<script src="__ROOT__/statics/js/common.js"></script>
</body>
</html>